//
//  BLTimeAxisAppearance+Render.m
//  BLTimeAxis
//
//  Created by dg on 2025/4/18.
//

#import "BLTimeAxisAppearance+Render.h"
#import "BLTimeAxisRuleRenderer.h"

@implementation BLTimeAxisAppearance (Render)

+ (void)renderRuleAppearanceWithDirection:(BLAxisDirection)direction {
    BLTimeAxisAppearance *appearance = [BLTimeAxisAppearance sharedAppearance];
    appearance.mainBackgroundColor = [UIColor redColor];
    appearance.rendererClass = [BLTimeAxisRuleRenderer class];
    appearance.direction = direction;
    
    appearance.ruleColor = [UIColor yellowColor];
    appearance.ruleStrokeSize = 1.0;
    appearance.ruleOffsetLocationType = BLStrokeLocationTypeMiddle;
    
    appearance.divisionColor = [UIColor whiteColor];
    appearance.divisionStrokeSize = 1.0;
    
    appearance.digitalAttribute = @{NSFontAttributeName:[UIFont systemFontOfSize:14], NSForegroundColorAttributeName:[UIColor whiteColor]};
    
    appearance.baseLineColor = [UIColor whiteColor];
    appearance.baseLineStrokeSize = 1.0;
    appearance.baseLineFixedOffset = 80.0;
    appearance.baseLineOffsetLocationType = BLStrokeLocationTypeFlexible;
    
    appearance.minimumScale = 1.0;
    appearance.maximumScale = 3.0;
    appearance.oneToOneScaleMatchMaxHoursInVisible = 4;
    
    appearance.dataStrokeColor = [UIColor blueColor];
    appearance.dataStrokeSizeType = BLStrokeSizeTypeFull;
}

@end
